package com.xuelang.pipeline.domain.msg.service.impl;


import com.xuelang.pipeline.client.common.result.PageRecord;
import com.xuelang.pipeline.client.msg.UserMessageDTO;
import com.xuelang.pipeline.client.msg.UserMessageQueryDTO;
import com.xuelang.pipeline.client.msg.UserMessageReadMsgDTO;
import com.xuelang.pipeline.client.msg.UserMessageSaveDTO;
import com.xuelang.pipeline.domain.msg.repository.MsgUserMessagesRepository;
import com.xuelang.pipeline.domain.msg.service.MsgUserMessagesDomainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户消息相关接口
 */
@Service
public class MsgUserMessagesDomainServiceImpl implements MsgUserMessagesDomainService {

    @Autowired
    MsgUserMessagesRepository messagesRepository;


    @Override
    public PageRecord<UserMessageDTO> findUserMessagePageList(UserMessageQueryDTO userMessageQueryDTO) {
        return messagesRepository.findUserMessagePageList(userMessageQueryDTO);
    }

    @Override
    public UserMessageSaveDTO saveMessage(UserMessageSaveDTO messageSaveDTO) {
        return messagesRepository.saveMessage(messageSaveDTO);
    }

    @Override
    public List<UserMessageDTO> userTagsReadMessages(UserMessageReadMsgDTO readMsgDTO) {
        return messagesRepository.userTagsReadMessages(readMsgDTO);
    }
}
